home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.002 / stk-3 / STk-3.1 / Lib / posix.stk < prev    next >
Encoding:
Text File  |  1996-07-23  |  1.3 KB  |  43 lines

  1. ;;;;
  2. ;;;; p o s i x . s t k         -- Posix function in Scheme
  3. ;;;;
  4. ;;;;
  5. ;;;; Copyright ⌐ 1993-1996 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
  6. ;;;; 
  7. ;;;; Permission to use, copy, and/or distribute this software and its
  8. ;;;; documentation for any purpose and without fee is hereby granted, provided
  9. ;;;; that both the above copyright notice and this permission notice appear in
  10. ;;;; all copies and derived works.  Fees for distribution or use of this
  11. ;;;; software or derived works may only be charged with express written
  12. ;;;; permission of the copyright holder.  
  13. ;;;; This software is provided ``as is'' without express or implied warranty.
  14. ;;;;
  15. ;;;;
  16. ;;;;           Author: Erick Gallesio [eg@unice.fr]
  17. ;;;;    Creation date: 15-Mar-1995 16:31
  18. ;;;; Last file update: 23-Jul-1996 09:15
  19. ;;;;
  20.  
  21. (if (symbol-bound? '%init-posix)
  22.     ;; Posix.1 module is in the core interpreter
  23.     (%init-posix)
  24.     ;; Try to load Posix.1 support dynamically
  25.     (load (string-append "posix." *shared-suffix*)))
  26.  
  27. ;;;;
  28. ;;;; Time functions
  29. ;;;;
  30. (define (posix-asctime . time)
  31.   (apply posix-strftime "%a %b %d %H:%M:%S %Z %Y\n" time))
  32.  
  33. (define (posix-ctime . time)
  34.   (let ((t (if (null? time) (list (posix-time)) time)))
  35.     (posix-asctime (apply posix-localtime t))))
  36.  
  37. ;;;;
  38. ;;;; Backward compatibility
  39. ;;;;
  40. (define posix-access? posix-access)
  41.  
  42. (provide "posix")
  43.